<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./TemplatePrincipal.xhtml">

            <ui:define name="top">
                <h:form>
                    <p:tabMenu id="menu" activeIndex="3" >  
                        <p:menuitem value="Home" action="index" />  
                        <p:menuitem value="Users" action="UserFacelets"/>  
                        <p:menuitem value="TypeClass" action="TypeClassFacelets" /> 
                        <p:menuitem value="Profiles" action="ProfileFacelets" />
                        <p:menuitem value="Services" action="ServiceFacelets" />
                        <p:menuitem value="Terrains" action="TerrainFacelets" />
                    </p:tabMenu> 
                </h:form>  
            </ui:define>

            <ui:define name="left">

            </ui:define>

            <ui:define name="content">
                <f:view>
                    <h:form>
                        <h1><p:outputLabel value="List"/></h1>
                        <p:commandButton value="New" action="#{profileBean.prepararNuevo()}" />
                        <p:dataTable value="#{profileBean.profiles}" var="item">
                            <p:column>
                                <f:facet name="header">
                                    <p:outputLabel value="Name"/>
                                </f:facet>
                                <p:outputLabel value="#{item.name}"/>
                            </p:column>
                            <p:column>
                                <p:commandButton value="Editar" action="ProfileCreateEdit" actionListener="#{profileBean.prepararEditar}" />
                                <p:commandButton value="Eliminar" action="ProfileFacelets" actionListener="#{profileBean.eliminar}" />
                            </p:column>
                        </p:dataTable>
                    </h:form>
                </f:view>
            </ui:define>

            <ui:define name="bottom">
                bottom
            </ui:define>

        </ui:composition>

    </body>
</html>
